<?php

session_start();
if (isset($_SESSION['count'])) {
    $_SESSION['count']++;
    echo "Sessao iniciada: " . $_SESSION['count'];
    echo "<br/><br/>";
    echo "<input type='submit' value='Atualizar' onclick='window.location.reload()' />";
} else {
    $_SESSION['count'] = 0;
    echo "Sessao encerrada";
}
?>